package com.example.neusoft.yuejian.Activity;


import android.view.View;
import android.widget.ImageView;
import android.widget.Switch;
import android.widget.TextView;

import com.example.neusoft.yuejian.Base.BaseActivity;

import com.example.neusoft.yuejian.Bean.SoWing;
import com.example.neusoft.yuejian.R;
import com.squareup.picasso.Picasso;


import java.util.List;



public class SowingDetailActivity extends BaseActivity implements View.OnClickListener {
    private SoWing sowing;
    private ImageView lbt, lbt_fh;
    private TextView bt;


    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.lbt_fh:
                finish();
                break;
        }
    }

    @Override
    public int getLayoutFile() {
        return R.layout.sowingdetail;
    }

    @Override
    public void initView() {
        lbt = (ImageView) findViewById(R.id.lbt);
        lbt_fh = (ImageView) findViewById(R.id.lbt_fh);
        bt = (TextView) findViewById(R.id.bt);

    }

    @Override
    public void initEvent() {
        lbt_fh.setOnClickListener(this);

    }

    @Override
    public void initData() {
        sowing = (SoWing) getIntent().getSerializableExtra("sowing");
        bt.setText(sowing.getSowingtitle());
        Picasso.with(this).load("http://10.0.2.2/YueJian/public/static/img/showimg/" +
                sowing.getSowingpic()).into(lbt);


    }


}
